import {BaseUrl} from "../constant/constant";
import {ApiFetch} from "../api/apiHandler";

class SpyderModel {
    constructor() {
        this.url = BaseUrl
    }

    get(params) {
        let end = this.url + 'getonoroff'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    switch(params) {
        let end = this.url + 'setonoroff'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    getPriority() {
        let end = this.url + 'getmatchyouxian'
        let req = new ApiFetch(end)
        return req.fetch()
    }

    setPriority(params) {
        let end = this.url + 'setmatchyouxian'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }
}

export default SpyderModel